The development of microelectromechanical systems (MEMS) has enabled the incorporation of a wide variety of sensors into mobile devices, such as cell phones, laptops, tablets, gaming devices and other portable, electronic devices. Non-limiting examples of sensors include motion sensors, such as an accelerometer, a gyroscope and a magnetometer. In many situations, operations known as sensor fusion may involve combining data obtained from multiple sensors to improve accuracy and usefulness of the sensor data, such as by refining orientation information or characterizing a bias that may be present in a given sensor.
For example, many motion tracking systems combine data from a gyroscope, an accelerometer and a magnetometer. In particular, the magnetometer may provide the rough heading (or yaw) information for the motion tracking system. The magnetometer measures the Earth's magnetic field as experienced by the sensor. When this measurement is accurate, the magnetometer will provide heading information that may be used as a reference in the motion tracking system, such as to correct any error in a heading determination. However, data received from the magnetometer may be corrupted by magnetic disturbances or anomalies caused by nearby ferrous objects, electric fields or other circumstances. As a result, the accuracy of motion tracking performed using corrupted magnetometer data may be degraded, often to the extent that motion tracking determinations made without the magnetometer data may be superior.
Accordingly, there is a need to rapidly detect the existence of magnetic disturbances. Further, there is a need to provide such detection in a power and computationally efficient manner, particularly for devices relying on batteries or employing embedded processing. This disclosure satisfies these and other needs as described in the following materials.